<%@ page import="com.chum.chamber.utils.GridView" %>
<%@ page import="com.chum.chamber.utils.GridBody" %>

<div>
	<table align="center">
		<thead class="gridHeader">
			<tr>
				<%
				GridView grid = (GridView)request.getAttribute("gridView");
				if (grid != null) {
					System.out.println(" :: grid view object :: "+grid);
					int headerLength = (Integer)grid.getGridHeader().size();
					int bodyLength = (Integer)grid.getGridBody().size();
					for (int hIndex = 0; hIndex < headerLength; hIndex++) {
					%>
					<td><%=grid.getGridHeader().get(hIndex)%></td>
					<%
				}
				%>
			</tr>
		</thead>
		<tbody>
			<%
			for (int bIndex = 0; bIndex < bodyLength; bIndex++) {
			%>
			<tr>
				<%
				GridBody gridBody = (GridBody)grid.getGridBody().get(bIndex);
				int columnLength = (Integer)gridBody.getGridColumn().size();
				for (int cIndex = 0; cIndex < columnLength; cIndex++) {
				%>
				<td><%=gridBody.getGridColumn().get(cIndex)%></td>
				<%
				}
				%>
			</tr>
			<%
			}
			%>
		</tbody>
			<%
		}
	%>
	</table>
</div>